outlineOrganizer chapterCount topicCount selectChars false visited strChecked strChecked outline topline group topLine X sizeIt bottomLine sizeIt sizeIt bottomLine topline m"topLine" objs rec = sz = pupp = syspageUnitsPerPixel sz > sz > xpix = syspageunitsperpixel ypix = b = ll = lr = ur = ul = ul,lr -- ll,lr,ur -- ll,ul, in,ms ThreeDeeRect bottomLine topLine outline strChecked selectedTextline Dogs 5 Poodles 6 Terriers 11 Cats 2 Persian 4 Siamese 3 Dalmations 7 Dalmations 7 74 90 Trees 95 Elm 97 Spruce 96 73 Trees 95 Elm 97 Spruce 96Trees 95 Elm 97 Spruce 96 44 Untitled 87 marker vertLoc vertLoc b value ypix = syspageunitsperpixel s = halfH = C- 3* strChecked buttonGroup yunewTopic false outline newChapter qkinitializePage Chapter Untitled header title buttonclick buttonclick stl = selectedTextLines "outline" vRef parentwindow initializePage currentPage %modal isopen pRef close title = "Untitled" B"Chapter" newChapter newTopic stl strChecked &New... editTopic strChecked &Delete updateButtons check buttonclick buttonclick s_cancel buttonclick buttonclick 4s_cancel Edit &Title: header topline group topLine X sizeIt bottomLine sizeIt sizeIt bottomLine topline m"topLine" objs rec = sz = pupp = syspageUnitsPerPixel sz > sz > xpix = syspageunitsperpixel ypix = b = ll = lr = ur = ul = ul,lr -- ll,lr,ur -- ll,ul, in,ms ThreeDeeRect bottomLine topLine header pageId lineNum Dogsations character paragraph wrwww w"'ww r'"ww "wr'w 'ww"w wwwr' wwww" wwwwr wxwww wwwwx toolbar ComboBox xcombobox focuswindow = false visited strChecked chapterCount topicCount previous buttonclick buttonclick -- sends the message currentPage strChecked buttonclick buttonclick -- sends the tmessage currentPage strChecked heading raisedField tbk_wid_name faceColor highlightColor shadowColor tbk_wid_props color,hls color,hls color,hls tbk_wid_values faceText strChecked highlight strChecked Table of contents shadow strChecked Table of contents J Z J strChecked Table of contents buttonclick buttonclick currentPage focuswindow = strChecked tableOfContents tableOfContents buttonclick buttonclick -- handled Hthe message navigates -- table contents tableOfContents currentPage strChecked Contents SectionLabel strChecked Section: outline @4bookOverview buttonup bookOverview strChecked topics topics buttonclick buttonclick -- causes navigation chapter heading currentPage focuswindow = strChecked Chapter Topics helpTemplate buttonclick buttonclick helpTemplate strChecked toolbar *ClassTbl* *ClassEntry* *PTABLE* *WINDOWSEG* *ICONRESTAB* *ICONRESSEG* *ICONRES* Background *OBJTABLE* *IDTABLE* *NAMETAB* Rectangle Ellipse RoundedRectangle Polygon IrregularPolygon AngledLine Curve PaintObject Picture Group Stage Button Viewer ComboBox Field RecordField Hotword *RHOTWORD* *TbxBase* ,&H.& wwwwwwwwwwwwwwwww wwwwwwwwwwwwwwwww strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked topic raisedField tbk_wid_name faceColor highlightColor shadowColor tbk_wid_props color,hls color,hls color,hls tbk_wid_values strChecked highlight strChecked Table of contents shadow strChecked Table of contents strChecked Table of contents strChecked Click on one of the topics below to view information on that subject.ubject. toolbar ThreeDeeRect out,true bottomLine topLine strChecked strChecked strChecked strChecked strChecked toolbar newpage previous first strChecked tableOfContents myChapter myPages chapterCount topicCount false visited 24,27 selectChars strChecked tableOfContents strChecked 60,Cats 68,Dogs pageList strChecked chapter1 strChecked pageID Dogster 1chapter check1 strChecked strChecked chapter2 strChecked pageID Catster 2 check2 strChecked strChecked chapter3 Timing Animation 66 Simulating Gravity 67 topics strChecked pageID Treesledcriptsn check3 strChecked strChecked chapter4 Chickens 26 Goats 25 topics pageID strChecked Untitledcripts check4 strChecked strChecked chapter5 strChecked pageID Untitled check5 strChecked strChecked chapter6 strChecked check6 strChecked strChecked chapter7 strChecked check7 strChecked strChecked chapter8 strChecked check8 strChecked in,ms ThreeDeeRect bottomLine topLine This is the Table of Contents page. The labels to the left list each chapter in the book. Clicking on a label navigates to the introductory page for that chapter. This book template is limited to eight chapters, and currently holds a few generic chapters and topics. Choose Using This Template from the Help menu for more information. Delete this field when you need it no longer.......................................... NotUpdate tableOfContents label myChapterID chapterCount topicCount 4,3,7 myPages 4,3,7 Siamese label myChapterID false visited Persian label myChapterID visited false myChapterID myPages label false label myChapterID visited Poodles Dalmations label myChapterID false visited newChapterOrTopic cancel initializePage cancel keyChar close initializePage val keyEnter chapterCount topicCount chapter &Chapter &Topic buttonclick buttonclick Cancel buttonclick buttonclick Cancel Cancel strChecked strChecked strChecked newChapterOrTopic outlineOrganizer lf = FALSE enabled of button "pause" of self = FALSE enabled of button "stop" of self = FALSE invert of button "pause" of self = FALSE invert of button "play" of self = FALSE invert of button "stop" of self = else clipStat = mmStatus of (clipRef of self) conditions when clipStat i MS Sans Serif MS Sans Serif MS Sans Serif MS Sans Serif MS Sans Serif System MS Sans Serif false MS Sans Serif firstTime System Arial toolbar page "toolbar" outline Template Outline page "outlineOrganizer" 83,116 clientSz 44,66 page "newChapterOrTopic" 136,120 4005,5550 4005,5655 label myChapterID visited Terriers false &File &Open... Ctrl+O &Save Ctrl+S Save &As... saveas &Import... import &Export... export Print Set&up... printsetup &Print Pages... Ctrl+P printpages Prin&t Report... printreport Send &Mail... sendmail &Run... E&xit Alt+F4 &Edit &Undo Ctrl+Z Cu&t Ctrl+X &Copy Ctrl+C &Paste Ctrl+V paste C&lear Del clear &Size to Page F11 sizetopage Aut&hor F3 author &Text &Character... F6 character &Paragraph... F7 paragraph &Regular Ctrl+Space regular &Bold Ctrl+B &Italic Ctrl+I italic &Underline Ctrl+U underline Stri&keout Ctrl+K strikeout Superscrip&t/Subscript superscriptSubscript &Normal Script normalscript Su&bscript Ctrl+L subscript Su&perscript Ctrl+Shift+L superscript &Page &Next Alt+Right &Previous Alt+Left previous &Help &Contents F1 contents Using this &Template helpTemplate Displays help for using this template. Status &Bar F12 statusbar 2,F3,F4,F5 Chapter Headings bottomLine topLine in,ms ThreeDeeRect strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked Topics strChecked strChecked topic1 8 H J pageId strChecked Poodlesonsrieverinerworks check1 strChecked strChecked topic2 pageId strChecked Terriersntrieverty objects 25 check2 strChecked strChecked topic3 pageId strChecked Dalmationsmationngbuttons 61 check3 strChecked strChecked Q + 2 topic4 pageId strChecked Dalmationsng a lineuces62 check4 strChecked strChecked topic5 pageId strChecked Siamese commandline4 check5 strChecked strChecked topic6 pageId strChecked Moving on idlec check6 strChecked strChecked topic7 pageId strChecked Billy7r7 check7 strChecked strChecked topic8 pageId strChecked Barbara8 check8 strChecked strChecked topic9 strChecked topic9r8O check9 strChecked strChecked topic10 strChecked topic108 check10 strChecked in,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked strChecked chapterLabel raisedField tbk_wid_name faceColor highlightColor shadowColor tbk_wid_props color,hls color,hls color,hls tbk_wid_values strChecked highlight > N J strChecked Dogster 1 shadow strChecked Dogster 1 strChecked Dogster 1 strChecked Click on one of the topics below to view information on that subject....... strChecked This background holds pages that introduce each chapter. A short description of the chapter goes in the record field to the left. Each topic in this chapter is displayed above. Clicking on the topic navigates to that page. Delete this field when you need it no longer. Copyright 1994 Asymetrix Corporation gives you permission e, revise, reuse the individual scripts your own applications. You may J entire substantial part redistribution b product. retains copyright on original elements . Include notice "Portions are contain copied Author: Joseph Brick Last revision: 5/9/94 Standard ToolBook messages menus, initialize Back handling enterApplication enabled "toolbar" sysRuntime c"&Contents" fhelpText "Options modifying content template." e"Template &Outline" alias "outline" c"contents" fhelptext\ "Displays/hides I palette." e"New &Chapter..." "Adds qchapter e"Change C& Name.." changeName" "Changes current Topic..." e"Using helpTemplate" ) on firstTime rebuildStructure checkmarks bk = topicsBackground() visited "tableofcontents" "tableOfContents" entermenu menuName,menuAlias chaptersBackground() disable TopicsBackground() "Page" -- known state e"Next" e"Previous" leaveapplication isOpen focusWindow mstate = menuItemChecked(" close inserted area, beyond Utility handlers -- returns /reference headings updatePalette ZpagesOfEachChapter,curPage,curBackground,prevChapterHeadingPage,chapterList,listBoxText ) = 2 pageCounter = 2 curPageId = pagelabel = xNULL myPages curChapterId = myChapterID = curChapterID & "," & pageLabel & tabSpacer() & -- either /. Move ;backgrounds age = voutline initializePage currentPage -- Used box a dialog used store extra information that gets clipped side extractName t tabOffset = extractID t lastTabLoc = U(t) numerical location itemOffset itm,lst color middleGray 240,63.5,2.1875 dark darkBlue 240,25.125,100 tabs. This serves a spacer between on each listbox. Navigation sent pressed pref = updatechecks mydir = = sysErrorNumber se = ss = bref = t&"tmplhelp.tbk") 1= ss "Cannot find 8TMPLHELP.TBK" vref = defaultpage "cbt1" = sen r= se newChapter promptForName chapterName = "Untitled" ("Enter ls = ssm = syssuspendmessages e= ls newTopic pageNum ls = = ssm e= ls sized ZbuttonPos spupp = sysPageUnitsPerPixel pRef currentPage gHeader gButtons "buttonGroup" gOutline "outline" marker oclientsize rightBorder cs - bottomBorder cs - bSize cs - sizeIt - 4* fb+10* fb - 18* openWindow Zsm_cxframe,sm_cyframe,sm_cycaption,defaultSize,defaultPosition {winRef 4metric indexes: 32 -- width sizable 33 -- height 4 -- 3000,5000 "0,0" X"user" INT getSystemMetrics( -- cache {references stored clientSize ini file clientSz pageUnitsToClient( the borders captions extraWidth extraHeight )*2+\ winref -- calculate maximimum ebased on maxSize "outlineOrganizer" ) maximumSize chandling about box: windowsized closeWindow statusbar -- enable table contents enabled B"tableOfContents" "toolbar" pref = pRef "heading" "Table -- Don't allow deletion "You cannot delete Ycutting "This template does xsupport adding initialize 4we land on initializePage highlightColor value shadowColor faceColor sized spupp = syspageunitsperpixel b = syssuspendmessages = -- This {serves %the table contents 8. It updated 'Book Overview dialog box voutline pageList limited maxTopics = 8 listCount = textlineCount( t = -- find that has been visited curG = ("g"&i) o = curField -- -- store links pageID remaining tabs ("g"&i) -- turn on selected goPage = initializePage -- highlights "buttons" (they're really fields) value lightGray darkBlue() -- updates checkmarks. Only checks chapter have updateChecks numChapters = 8 -- representing a " -- each made up a checkbutton. ("g"&i) o = -- Yreferences checkref -- stored -- a userProperty myPages subPages = mypages -- walk through -- curID checkRef updateLabels -- -- ("g"&i) o = -- = label up toolbar pref = enabled on the outline selectedTextLines currentPage xtopicsBackground() pRef -- updates . sent entered that navigates initializePage "heading" label "chapterLabel" table contents myPages = topicList updateCheckMarks updateChecks clearing a "You cannot delete "Warning: operation 8be reversed ]Undo." f"OK" "Cancel" ls = curBK = xchaptersBackground() rebuildStructure e= ls -- same [handler f"OK" ls = e= ls newChapter highlightColor value shadowColor faceColor sized spupp = syspageunitsperpixel b = syssuspendmessages = -- This {lives on the "Chapter Headings" serves %table contents every chapter. Each heading -- has one a userProperty (myPages) containing a -- list idnumbers BookOverview dialog box passed handler via pageList parameter. topicList limited maxTopics = 10 listCount = curPageID -- find out that been visited v = curG = ("g"&i) o = curField curCheck -- update each Mbased on label ( -- checkmark, appropriate p <> v -- store {navigation pageID -- hidden remaining tabs ("g"&i) -- updates checkmarks. called instead coming since only need be updated updateChecks -- representing a " -- made up a checkbutton. curTopic = ("g"&i) o = fieldRef checkRef curPageId = curpageID -- turn on selected goPage = (pageid initializePage -- highlights M"buttons" (they're really fields) value lightGray darkBlue() -- flag %having been visited up toolbar toolbarRef = enabled -- only allow same chapter xchaptersBackground() "outline" selectedTextLines currentPage -- initializes the label a user property each content heading initializePage ID (mychapterID "topicLabel" pressed, contents V. myChapterId a userProperty containing . It 8overview dialog box. backpage = (myChapterID updateCheckMarks added, newTopic nextPageParent = myPages deleted. "You cannot "Warning: operation 5be reversed ]Undo." f"OK" "Cancel" ls = curBK = xtopicsBackground() rebuildStructure e= ls -- maintain navigational structure f"OK" ls = e= ls highlightColor value shadowColor faceColor sized spupp = syspageunitsperpixel b = syssuspendmessages = -- initializes the structure outline form chapters < extractName strng tabOffset = lastTabLoc = -- puts a insertName ,newName "" startLoc = 2 endLoc = R(startloc - 1) -- pulls zout -- < extractNumber txt colOffset ~(":", .- 1 istype(" 4s_cancel keyEnter updateText lineNum chapter fref "outline" curLine insertName( pRef = (pageID label chaptersBackground() updateLabels "tableofcontents" bkRef = topicsBackground() initializePage 4s_enterText enabled "updateButtons" buttonclick o = "outline" stl = selectedTextLines tlineNum = chapterOrPage "Delete (s)?" f"OK" "Cancel" startline ssm = sysSuspendMessages (stl) curID = extractID( BstartLine "Cannot delete the /" && /& "." curBK = xtopicsBackground() xchaptersBackground() = ssm rebuildStructure initializePage renumberText count extractNumber( ~(":", t)-1 key,isShift keyupArrow && keyDownArrow && keyFirst && keyLast oselectedtextlines updateHeader tl 4s_cancel stl = selectedTextLines lineNum fref = txtline = chapter txtLine) extractName( pageId extractID( enabled "updateButtons" maxChapter C(t) -- This main dragAndDrop code: 4s_navFromPalette sls = gotopage initializePage enormous handler handles selecting, dragging, dropping listbox ZstartLine,endLine,lineHeight,mybounds,xloc,mytext -- Find Bclicked on. will be starting -- Break user V edge startline = <= 0 Uwe want n. we value -- later we've a heading: endline = -- lineheight pageUnits (see below): -- Cache commonly used values xpix = sysPageUnitsPerPixel ypix = myBounds = myText = marker = totalLineCount = we know be between sides -- The following section selects B(s): -- lineList corresponding -- we wish 9-- (We've headingOrTopic = " -- Walk down Zwe hit another -- incrementing needed: oselectedTextlines moves arrow up -- targetLine insertion point loop executes mousebutton released: mouseLoc = -- above -- calculate Ucurrently -- there's beyond -- somewhere pnt = -- -- vertLoc -- lineYloc returns `location a given -- -- inside U(s): toward U(s) 1 place -- that we -- numLines . + 1 -- targetline > -- we asure moved -- -- original -- "," & reorder scrollToSelectedTextLine (stl) b = s = > s + - numlines,0) units - 1 - -- adjusts . Called adjustsize n b = * n + 3* v = b - 16* -- initialize the sized outfield = "outline" ypix = sysPageUnitsPerPixel o = b = syssuspendmessages = adjustsize ylineheight o,3) font gets changed , reset fontChange 4s_lheight notifyAfter -- returns a given linkStuff fref makeFont stringHeight() destroyFont windows stuff linkstuff X"gdi" getTextExtent( gselectObject( deleteObject( gcreateFont( linkDLL "user" ggetDC( releaseDC( makefont fontName,pitch, weight ghfont,hOldObject,hdc sysClientHandle) syspageunitsperpixel fheight ((1440/ /72)) -- pixels hFont <,0,0,0, ,0,0,0,0,0,0,0,0, "Failure: no logical created." -- kills sysclientHandle, twips, length stringLen ,strlen strLen k65536) * "aaa",3) y65536) * highlightColor value shadowColor faceColor sized spupp = syspageunitsperpixel b = syssuspendmessages = ,&H.& Displays/hides Template Outline palette. helpTemplate &Contents Change To&pic Name.. Using this &Template false Displays help on using this template. Options for modifying content of this template. Changes name of current chapter. New &Chapter... outline Cvisited changeName rebuildStructure tableOfContents toolbar tableofcontents firstTime firstTime Adds new chapter to this book. Change C&hapter Name.. Changes name of topic chapter. New &Topic... author Adds new topic to this chapter. contents topicsBackground Template &Outline enterApplication reader Change Chapter Name... chaptersBackground author Previous outline topics Change Topic Name... contents TopicsBackground entermenu helpTemplate Contents leaveapplication outline toolbar author outline toolbar reader outline mstate rebuildStructure contents outline chaptersBackground topicsBackground newBackground chapter headings chaptersBackground topics topicsBackground w, #> .', 7 w, #> PBmyPages voutline curChapterId myChapterID pagelabel outline tabSpacer curPageId tableofcontents tableOfContents chaptersBackground label topicsBackground qkinitializePage rebuildStructure .', " extractName extractID ,&H.& itemOffset O@middleGray 9@darkBlue tabSpacer tableOfContents tableofcontents updatechecks tableOfContents .', " Cannot find book TMPLHELP.TBK mydir tmplhelp.tbk helpTemplate initializePage cancel chaptersBackground label rebuildStructure chapterName Enter new chapter name. Untitled topicsBackground newChapter cancel Enter new topic name. chaptersBackground lastPage label rebuildStructure chapterName Untitled topicsBackground newTopic cancel Enter new name. label rebuildStructure label changeName buttonGroup gHeader marker gButtons outline spupp X sizeIt bSize header gOutline rightBorder sized getSystemMetrics exclientSz maxSize clientSz getSystemMetrics outlineOrganizer openWindow <+V!! statusbar fxclientSz closeWindow tableOfContents toolbar background previous topics tableOfContents toolbar Table of contents heading enterBackground tableOfContents toolbar leaveBackground You cannot delete this page. clear You cannot cut this page. This template does not support adding new pages to the table of contents. newPage qkinitializePage initializePage highlight highlightColor shadow shadowColor faceColor highlight highlightColor shadow shadowColor faceColor ,&H.& ,&H.& spupp highlight shadow sized pageID curField voutline false goPage qkinitializePage Zselected pageID buttondown [darkBlue selected checkref false Cvisited subPages curID pageID pageID OBmypages value updateChecks pageID pageID label updateLabels previous outline topics toolbar topicsBackground enterpage myPages topics topicList toolbar heading chapterLabel label OBmyPages initializePage topics updateChecks OBmyPages updateCheckMarks .', " Cancel Warning: this operation cannot be reversed using Undo. chaptersBackground curBK rebuildStructure You cannot delete the last page of this background. topicsBackground clear .', " Cancel Warning: this operation cannot be reversed using Undo. chaptersBackground curBK rebuildStructure You cannot delete the last page of this background. topicsBackground newChapter newPage qkinitializePage qkinitializePage previous highlight highlightColor shadow shadowColor faceColor highlight highlightColor shadow shadowColor faceColor ,&H.& ,&H.& spupp highlight shadow sized curCheck Cvisited pageID curField curPageID label topicList checkRef fieldRef Cvisited curPageId pageID curTopic updateChecks false goPage qkinitializePage Zselected pageid buttondown [darkBlue selected chaptersBackground Cvisited outline topics previous toolbar toolbarRef enterpage topicLabel toolbar heading mychapterID label initializePage backpage qkinitializePage myChapterID topics yunewTopic newPage chaptersBackground author qkinitializePage nextPageParent qkinitializePage previous .', " Cancel Warning: this operation cannot be reversed using Undo. chaptersBackground curBK rebuildStructure You cannot delete the last page of this background. topicsBackground clear .', " Cancel Warning: this operation cannot be reversed using Undo. chaptersBackground curBK rebuildStructure You cannot delete the last page of this background. topicsBackground highlight highlightColor shadow shadowColor faceColor highlight highlightColor shadow shadowColor faceColor ,&H.& ,&H.& spupp highlight shadow sized outlineField outline LPscrollToSelectedTextline updateHeader initializePage s_lheight enterpage ,&H.& extractID curTextLine false outline curID voutline rebuildStructure curPage reorder extractName extractID 1, "j insertName .', " extractNumber s_cancel false keychar curLine bkRef chaptersBackground outline label insertName pageID tableofcontents chapter x5chapter lineNum topicsBackground BlineNum updateLabels qkinitializePage updateText s_enterText updateButtons enterField s_cancel s_enterText updateButtons updateText leaveField Cancel extractID chaptersBackground curBK chapterOrPage tlineNum curID Cannot delete the last page of background startline rebuildStructure chapter Delete selected page(s)? outline topicsBackground qkinitializePage buttonclick 1, "j ,&H.& count OZextractNumber renumberText keychar keyFirst keyLast keyup .'+ + txtline s_cancel extractID extractName y5chapter BlineNum updateButtons lineNum OZextractNumber pageId header updateHeader OZextractNumber maxChapter extractID qkinitializePage gotopage s_navFromPalette buttondoubleclick V, #> mouseLoc 7renumberText marker count headingOrTopic lineHeight targetLine lineList /?reorder tlines topic llineYloc heading updateHeader tline IvertLoc buttondown lineHeight scrollToSelectedTextLine lineYloc marker lineHeight adjustsize outline lineheight outfield adjustsize sized s_lheight fontChange fontChange character fontChange paragraph UdmakeFont destroyFont linkStuff outline s_lheight /$stringHeight lineheight getDC releaseDC SIgetTextExtent selectObject deleteObject bol-# createFont linkstuff ,"JHY selectObject hOldObject }releaseDC Failure: no logical font created. getDC createFont hfont weight makefont .', " selectObject deleteObject hOldObject }releaseDC hfont destroyFont jogetTextExtent stringLen jogetTextExtent stringHeight highlight highlightColor shadow shadowColor faceColor highlight highlightColor shadow shadowColor faceColor ,&H.& ,&H.& spupp highlight shadow sized Chapter Headings Topics strChecked strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked out,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked strChecked strChecked strChecked strChecked strChecked strChecked in,true ThreeDeeRect strChecked strChecked bottomLine strChecked topLine strChecked strChecked strChecked topicLabel raisedField tbk_wid_name faceColor highlightColor shadowColor tbk_wid_props color,hls color,hls color,hls tbk_wid_values strChecked highlight strChecked Poodlessnsrieveriner shadow strChecked Poodlessnsrieveriner strChecked Poodlessnsrieveriner in,ms ThreeDeeRect bottomLine topLine strChecked This background holds the topic content pages. A short description of the topic goes in the record field on the left. An illustration or example appears in the area on the right. Delete this field when you need it no longer...Clicking on the topic navigates to that page. Delete this field when you need it no longer. Topics ttonclick -- sends the message currentPage